classic_battlefield_moddingfandomcom-20200214-history
Importing Objects Bundles and Lists into 3ds Max
Importing statics objects lists and bundles into 3ds Max Tools: 3ds Max, BF2 plugin tools for 3ds Max First of all, there are several reasons you might want to do this: # Import static object list in order to create an object bundle. (i.e, the ship complex in Iron Gator) # Create an custom AImesh # Porting to different game (1942 to BF2, for instance or even a completely new game engine). # You want to edit a map in 3ds max instead of the editor. # Lightmapping, (of course) This uses the BF2 lightmapping plugin tool for 3ds Max. The overview of the sequence is: - convert the bundle items to static object format and save as staticobject.con - Swap out a map for the mod with this new staticobject.con file - start up the map in the editor, create a dummy spawn point and then save. This updates the staticobject.con file the editor info listing the location of each static object in the file. - import the staticobject.con file into 3dsMax using the BF2 lightmapping tool. From 3ds Max, select the BF2 plugin and then go to lightmapping. Choose import static objects. Select the static object file for the map you are interested in. Be aware that the objects must be exported to where the import tool can find them. Where is exactly is that, you ask? Well, look in the staticobject.con file. The import plugin actually looks at the first section of the staticobjects.con file to figure out where to go looking for each object. It should look something like this: if v_arg1 BF2Editor console.allowMultipleFileLoad 0 run /objects/staticobjects/industry/ind_buildings/lrgfactorybuilding/lrgfactorybuilding.con run /objects/staticobjects/industry/uniqueobjects/coolingtower/coolingtower_01/coolingtower_01.con run /objects/staticobjects/industry/ind_buildings/dam_powerbase/dam_powerbase.con run /objects/staticobjects/common/com_objects/ladder_10m_noholders/ladder_10m_noholders.con run /objects/staticobjects/industry/ind_buildings/lrgstrgbuilding_03/lrgstrgbuilding_03.con run /objects/staticobjects/industry/ind_buildings/constructhouse_01/constructhouse_01.con run /objects/staticobjects/common/com_objects/ladder_construct/ladder_construct.con run /objects/staticobjects/common/com_objects/ladder_3m/ladder_3m.con If it's not loading up, start up the map in the editor, create a spawn point and save. The editor will save staticobject file and update that upper section for you. But what about an object bundle? Well, that takes a bit more work. Each object in the bundle will need to be converted into a static object format like this: Object.create coolingtower_01 Object.absolutePosition -89.381/188.040/-101.707 Object.rotation 0.5/0.0/0.0 Object.layer 1 Don't worry about trying to figure out relative vs actual positions. When you import into 3ds Max it will all be relative. Here is a script to handle the conversion: https://drive.google.com/file/d/1zKfRAHVHNgocXkSC4tAZO8J-19uRuBUA/view?usp=sharing It is a python scrip and you need Python 2.7 installed. You will need to enter the full path and file name. The script will convert the file and write it out with a _SO.con at the end of the file name, leaving the original unchanged. Now, open up the map in the editor with the newly create staticobject.con file. (make a back up of the map first) Create a spawn point and save. Now you have an staticobject.con file that can load up your object bundle in 3ds Max. There is an issue with inporting object bundles that are set with a rotation for the whole bundle. The objects inside the bundle don't get positioned correctly. The workaround is to import without a rotational setting, and then do the rotation on the all the bundle objects at one time within 3ds Max. So, once you have each bundel rotated, you can export each bundle as FBX and them import them back into the main scene. You could use these and weld them together to create a new AImesh if that was your purpose, however, these are probably more complex than what you need. Freeze the selection and use as guide to import and position the collision mesh of each part. You can also clean up the scene. If you open up schematic view, you can select all the objects in green, because all you need are the ones in blue. As shown below: